"""make_workflow_id_nullable_in_products

Revision ID: aeda794b1e1a
Revises: 216bb1bd2e33
Create Date: 2025-09-09 17:26:12.204316

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision: str = 'aeda794b1e1a'
down_revision: Union[str, None] = '216bb1bd2e33'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('products', 'workflow_id',
               existing_type=mysql.INTEGER(),
               nullable=True,
               existing_comment='关联的工作流ID')
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('products', 'workflow_id',
               existing_type=mysql.INTEGER(),
               nullable=False,
               existing_comment='关联的工作流ID')
    # ### end Alembic commands ###
